Porovnani textovych souboru

Otázka od: Jiri Brothanek

28. 7. 2004 11:05

Zdravim,

potreboval bych vzajemne porovnavat ve svem programu v D dva textove
soubory.
Vystup by mohl byt dalsi tex. soubor, kde rozeznam radky pridane, smazane
(zmenene) atd.

Pokud znate nejake hotove reseni, prosim o radu.

Diky Jiri Brothanek.


Odpovedá: Lukas Barton

28. 7. 2004 12:32

Zavolat si na to diff.

   Lukas

> Zdravim,
>
> potreboval bych vzajemne porovnavat ve svem programu v D dva textove
> soubory.
> Vystup by mohl byt dalsi tex. soubor, kde rozeznam radky pridane, smazane
> (zmenene) atd.
>
> Pokud znate nejake hotove reseni, prosim o radu.
>
> Diky Jiri Brothanek.
>
 


Odpovedá: Petr Brant

28. 7. 2004 12:56

 V MSDN jsem nasel toto, to bude to, co potrebujes:

To compare files and display the results graphically, use Windiff.exe. The
following line shows Windiff command-line syntax:
windiff [path1] [path2]
where path1 and path2 indicate the files to be compared. Windiff uses the
following rules to determine what is to be compared:
* If you invoke Windiff without specifying path1 or path2, you can
click Compare Files or Compare Directories from the File menu to specify the
files to compare.
* If you invoke WINDIFF with a filename for path1, but nothing for
path2, Windiff compares the file with a file of the same name in the current
directory.
* If you invoke Windiff with a directory name for path1, but nothing
for path2, Windiff compares the files in the specified directory with the
files in the current directory.
* If you invoke Windiff specifying files for path1 and path2, Windiff
compares the two files.
* If you invoke Windiff specifying directories for path1 and path2,
Windiff compares the files in those directories.
The results are initially displayed in outline mode. Windiff lists the files
that were compared and indicates whether they are identical or whether one
file is newer than the other. To view the differences in expanded mode,
select the file from the display and click the Expand button. The parts that
are common to both files are displayed on a white background. The parts that
belong to the file listed on the left are displayed on a red background. The
parts that belong to the file listed on the right are displayed on a yellow
background. To return to outline mode, click the Outline button.
For more information, see the help file Windiff.hlp, which is included with
Windiff.

RNDr. Petr Brant [brant@dcomm.cz]
http://brant.wz.cz <http://brant.wz.cz>

D&COMM s.r.o.
Korunovacni 6
Praha 7
tel. +420724007234


> potreboval bych vzajemne porovnavat ve svem programu v D dva textove
> soubory.
> Vystup by mohl byt dalsi tex. soubor, kde rozeznam radky pridane, smazane
> (zmenene) atd.
>
> Pokud znate nejake hotove reseni, prosim o radu.
>

Odpovedá: Petr Vones

29. 7. 2004 11:22

From: "Jiri Brothanek" <jiri.brothanek@seznam.cz>
> potreboval bych vzajemne porovnavat ve svem programu v D dva textove
> soubory.
> Vystup by mohl byt dalsi tex. soubor, kde rozeznam radky pridane, smazane
> (zmenene) atd.
>
> Pokud znate nejake hotove reseni, prosim o radu.

http://www.araxis.com/merge/

Petr Vones